import { DEFAULT_LAYOUT } from "../base";
import { AppRouteRecordRaw } from "../types";

const EXCEPTION: AppRouteRecordRaw = {
  path: "/urlshorten",
  name: "urlshorten",
  component: DEFAULT_LAYOUT,
  meta: {
    locale: "网址缩短",
    requiresAuth: true,
    icon: "icon-link",
    order: 1
  },
  children: [
    {
      path: "/urlshorten/online",
      name: "online",
      component: () => import("@/views/urlshorten/online/index.vue"),
      meta: {
        locale: "网址在线缩短",
        requiresAuth: true,
        roles: ["admin"]
      }
    },
    {
      path: "/urlshorten/batch",
      name: "batch",
      component: () => import("@/views/urlshorten/batch/index.vue"),
      meta: {
        locale: "文件批量生成",
        requiresAuth: true,
        roles: ["admin"]
      }
    },
    {
      path: "/urlshorten/useApi",
      name: "useApi",
      component: () => import("@/views/urlshorten/useApi/index.vue"),
      meta: {
        locale: "对接Api生成",
        requiresAuth: true,
        roles: ["admin"]
      }
    },
    {
      path: "/urlshorten/restore",
      name: "restore",
      component: () => import("@/views/urlshorten/restore/index.vue"),
      meta: {
        locale: "短链还原",
        requiresAuth: true,
        roles: ["admin"]
      }
    }
  ]
};

export default EXCEPTION;
